import sys
sys.path.extend([r'C:/code/Py'])

from cloud_server.ali_dns_domain import *


def cui():
    strLong = 60
    print('*' * strLong)
    print('**' + ' 1. Add Domain Record '.ljust(strLong-4) + '**')
    print('**' + ' 2. View lookup all of Record with Domain.'.ljust(strLong-4) + '**')
    print('**' + ' 3. Update a Domain Record with a RecordID. '.ljust(strLong-4) + '**')
    print('**' + ' 4. Delete a Domain Record with a domain '.ljust(strLong-4) + '**')
    print('**' + ' 5. View all of the Operation Logs with a Domain. '.ljust(strLong-4) + '**')
    print('**' + ' 6. Exit. '.ljust(strLong-4) + '**')
    print('*' * strLong)


def main():
    client = AliClientAPI()
    cui()
    _your_choose = input("输入你的选则：")
    if _your_choose == '1': client.add_record()
    elif _your_choose == '2': client.demand_all_record()
    elif _your_choose == '3': print("内容正在建设中 ...")
    elif _your_choose == '4': client.del_record_use_RR()
    elif _your_choose == '5': pass
    elif _your_choose == '6': exit(0)
    else: print("你的输入有误。")
    input('按任意键继续...')


if __name__ == "__main__":
    while True:
        main()
